<template>
    <div>
        <!-- 订单商品卡片 -->
        <van-card v-bind:price="product.price" v-bind:desc="product.description" v-bind:thumb="product.image_urls[0]" />
        <!-- 地址信息 -->
        <van-cell-group>
            <van-cell v-bind:value=user.address title="地址" icon="location-o" />
            <van-cell v-bind:value=user.tel title="电话" icon="phone-o" />
            <van-cell v-bind:value=product.guarentee title="保证金：¥" />
        </van-cell-group>
    </div>

</template>

<script>

export default {
    name: "order-model",
    data() {
        return {
            product: {
                id:500,
                description: "ROG幻14 2022款r7 6800 rx6700s笔记本华硕玩家国度幻14系列2022款，配备AMD-R7-6800HS，八核CPU 16G ddr5 4800MHz内存，独显rx6700s，显存8G，1TB高速固态，14寸ips屏，2.5k分辨率，120hz，100%色域",
                price: 10,
                guarentee: 9999,
                image_urls: ["https://img.yzcdn.cn/vant/cat.jpeg", "https://img.yzcdn.cn/vant/cat.jpeg"],
                createrId: 1,
            },
            user: {
                id: 30,
                address: "地址",
                tel: "1999999"
            }
        }
    },
    methods: {
        init() {
            /* this.axios({
                method: "get",
                url: "http://localhost:9051/goods",
                params: {
                    id: this.$store.state.productId,
                }
            }).then(response => {
                this.product.description = response.data.description
                this.product.price = response.data.price
                this.product.guarentee = response.data.guarentee
                this.product.image_urls[0] = response.data.image
            })

            this.axios({
                method: "GET",
                url: "/pi/me"
            }).then(response => {
                this.user.id = response.data.id
                this.user.address = response.data.address
                this.user.phone = response.data.phone
            }) */
        },
        // transInfo() {
        
        // }

    },
}
</script>
<style>
</style>